# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-x-wr-timezone
_pyname=x-wr-timezone
pkgver=1.0.1
pkgrel=0
pkgdesc="Handling of non-standard X-WR-TIMEZONE icalendar property in Python and Command Line"
url="https://github.com/niccokunzmann/x-wr-timezone"
arch="noarch"
license="LGPL-3.0-or-later"
depends="python3 py3-icalendar py3-tzdata"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/niccokunzmann/x-wr-timezone/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	# Disable command line test since we aren't installed yet.
	# Disable unnecessary test that adds another dependency.
	PYTHONPATH=. pytest \
		--ignore test/test_command_line.py \
		--ignore test/test_readme.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
4c388efc2b5710f5db24de218d72ef4ddfd951186fa67631a34f48d49ffcd391195f0232104c586eeae18fb414eab61b3bb1f52d39416c2123eb452a44f20ad6  x-wr-timezone-1.0.1.tar.gz
"
